<?php
// $Id: template.php,v 1.1.2.6.4.2 2011/01/11 01:08:49 dvessel Exp $

/**
 * The default group for NineSixty framework CSS files added to the page.
 */
function admin_menu(){
	$admin_menu = array(
		'home'=>array(
			'attributes'=>array(
				'title'=>'',
			),
			'href'=>'admin',
			'title'=>'Trang chủ'
		),
		'laptop'=>array(
			'attributes'=>array(
				'title'=>'',
			),
			'href'=>'admin/content',
			'title'=>'Nội dung/Sản phẩm'
		),
	);
	return $admin_menu;
}
/**
 * Preprocessor for page.tpl.php template file.
 */
function crm_admin_preprocess_page(&$vars, $hook) {
//die(print_r(theme_get_suggestions(arg(),$hook)));
///print_r($vars['main_menu']);
//print_r(admin_menu());

$vars['admin_menu_links'] = theme('links__system_main_menu', array(
      'links' => admin_menu(),
      'attributes' => array(
        'id' => 'admin-menu',
        'class' => array('topmenu'),
      ),
      'heading' => array(
        'text' => t('Admin menu'),
        'level' => 'h2',
        'class' => array('element-invisible'),
      ),
    ));

//die($vars['admin_menu_links']);
	$vars['admin_menu'] = theme('links',admin_menu());
  // For easy printing of variables.
  $vars['logo_img'] = '';
  if (!empty($vars['logo'])) {
    $vars['logo_img'] = theme('image', array(
      'path'  => $vars['logo'],
      'alt'   => t('Home'),
      'title' => t('Home'),
    ));
  }
  $vars['linked_logo_img']  = '';
  if (!empty($vars['logo_img'])) {
    $vars['linked_logo_img'] = l($vars['logo_img'], '<front>', array(
      'attributes' => array(
        'rel'   => 'home',
        'title' => t('Home'),
      ),
      'html' => TRUE,
    ));
  }
  $vars['linked_site_name'] = '';
  if (!empty($vars['site_name'])) {
    $vars['linked_site_name'] = l($vars['site_name'], '<front>', array(
      'attributes' => array(
        'rel'   => 'home',
        'title' => t('Home'),
      ),
    ));
  }

  // Site navigation links.
  $vars['main_menu_links'] = '';
  if (isset($vars['main_menu'])) {
    $vars['main_menu_links'] = theme('links__system_main_menu', array(
      'links' => $vars['main_menu'],
      'attributes' => array(
        'id' => 'main-menu',
        'class' => array('inline', 'main-menu'),
      ),
      'heading' => array(
        'text' => t('Main menu'),
        'level' => 'h2',
        'class' => array('element-invisible'),
      ),
    ));
  }
  $vars['secondary_menu_links'] = '';
  if (isset($vars['secondary_menu'])) {
    $vars['secondary_menu_links'] = theme('links__system_secondary_menu', array(
      'links' => $vars['secondary_menu'],
      'attributes' => array(
        'id'    => 'secondary-menu',
        'class' => array('inline', 'secondary-menu'),
      ),
      'heading' => array(
        'text' => t('Secondary menu'),
        'level' => 'h2',
        'class' => array('element-invisible'),
      ),
    ));
  }
//print_r($vars);
}
